<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<p id="time"></p>
<script>
    function get_current_day() {
        let cn_date = ['一','二','三','四',"五",'六','末']
        let time = new Date();
        let month=time.getMonth()+1;
        let week = cn_date[time.getDay()-1];
        return time.getFullYear()+"年"+month+'月'
            +time.getDate()+'日'+"&nbsp"+time.getHours()+":"
            +time.getMinutes()+":"+format_sec(time.getSeconds())
            +"&nbsp周"+week;
        // return time_current
    }

    function format_sec(time){
        time = time - 0;
        //1 //01  //4:00:05
        if(time< 10){
            time = "0"+time.toString()
        }
        return time
    }
    function day() {
        //#time{}
        let p = document.getElementById("time");
        p.innerHTML = get_current_day();
    }
    setInterval(day,100)

</script>
</body>
</html>